This invention relates generally to the field of computer systems. More particularly, a system and methods are provided for developing a web page that comprises dynamically generated content.
A typical web page comprises static content formatted according to a browser-interpretable markup language, such as Hypertext Markup Language (HTML). This type of page can be effective for ‘one-way’ publishing of material that changes infrequently.
Increasingly, however, the World Wide Web is transforming into a two-way environment in which dynamic web pages may behave similarly to interactive standalone applications (e.g., a spreadsheet, a personal database). In particular, a dynamic web page may be used to deliver time-sensitive or personalized page content to a user's browser.
Often, a dynamic web page will vary the content it delivers based upon any number of variables, including information provided by a browser user, the identity or geographic location of a user, selections made by a user while viewing a web page, etc. For example, a weather-related web page may dynamically generate a localized weather forecast based upon a user's zip code, or a travel-related web page may dynamically display, in a user's browser, a listing of available seats on a user-selected airline flight.
Dynamic content for display within a dynamic web page may be generated by a web application server in response to a user request. A web application server may be an application server configured to implement the JavaServer Pages™ (JSP™) specification. A dynamic web page (e.g., a JSP page) may have a high degree of complexity and therefore may be difficult and time-consuming for a web page developer to create, edit and/or maintain.
A typical JSP page comprises standard web page markup language code (e.g., static HTML), often called template text, interleaved with special JSP elements for generating the dynamic parts of a page that may differ from one page request to another. JSP elements characteristically comprise scripting elements such as Java™ scriplets or Perl scripts directing a server to insert dynamically generated content at a specified location in the page. JSP scripting elements, similar to elements in many Standard General Markup Languages (SGML), are typically surrounded by pairs of angle brackets and ‘percent’ symbols (e.g., <% . . . %>) the combination of which forms a JSP tag.
JSP elements may also comprise directive elements specifying information about a JSP page that remains the same between page requests, such as the scripting language used in the page (e.g., JavaScript, Perl, VBScript), the name of the page, etc. JSP elements may further comprise action elements, which typically perform actions such as retrieving time-sensitive data from a database.
Generally, a browser client submits a JSP page to a JSP enabled web or application server. The server executes the JSP scripting elements within the page, by generating dynamic page content (e.g., HTML) corresponding to the JSP scripting elements and replacing each JSP scripting element with the corresponding dynamically generated content. Thus, the server merges the dynamically generated content with the static code or content of the page before returning the dynamically composed page to the requesting browser.
A JSP enabled server may also execute JSP elements in a JSP page that do not generate content (e.g., directive elements, action elements). Such elements may declare variables, or facilitate decision flow control (e.g., if statement, switch statement) for executing dynamic code. The JSP server may replace these JSP elements with a null or empty text string in the dynamically composed page.
When executing a JSP element, a JSP enabled server may retrieve content from a database and/or enforce logic rules when fulfilling the corresponding JSP page request.
Often, custom functionality common to multiple dynamic web pages, such as accessing a database, processing a web page form, or other recurring tasks, may be added to a JSP enabled server and/or a JSP page. Such functionality may be added by pre-defined reusable modules called tag libraries.
To help a web page developer create, edit and/or maintain a web page, a web page authoring tool may be used. Currently available web page authoring tools include intuitive what-you-see-is-what-you-get (WYSIWYG) interactive visual tools, graphical user interfaces (GUI's), and integrated development environments (IDEs). These tools may facilitate direct manipulation of static web page content, but generally do not provide similar assistance during the creation and editing of dynamically generated page content.
Generally, a visual WYSIWYG-based web page editing tool does not identify, create, or maintain associations or relationships between page content elements displayed in the editor, dynamic source code elements (e.g., JSP elements) underlying the displayed content elements, and corresponding page content dynamically generated by a JSP-enabled server. Therefore, when developing a web page comprising dynamic content, a page developer must often create or edit web source code using a text-based editor or source code type editor.
Unfortunately, when developing a dynamic web page, a text-based editing tool may require a developer to be intimately familiar with the language structure, syntax and formatting rules of several web page languages and technologies (e.g., HTML, Java, JSP). Further, in order to view changes made to the source code, a developer may be required to manually spawn a browser or similar viewer.
Because text-based web page editing tools can be cumbersome to use, and do not allow a developer to directly manipulate or view dynamically generated page content in a WYSIWYG view as a web page is being created or edited, there is a need in the art for a system and method for developing a web page comprising dynamically generated content. There is also a need for a system and method for maintaining and continually updating an in-memory representation, or model, of a dynamic web page.